package dbAdapter;

import java.sql.Date;

import android.content.Context;


public class CreateDailyInfoData {
	public void create(Context ctx){
		DailyInfoDBAdapter1 dailyInfodb = new DailyInfoDBAdapter1(ctx);
		dailyInfodb.open();
		int[] caloriesConsumed = new int[] { 
				2000, 2010, 2020, 2030, 2040, 2400, 1920, 1950, 2300, 1800, 1700,
				1750, 1850, 2000, 2100, 1790, 1900, 1850, 2000, 2200, 2050, 1000 };
		int[] caloriesBurnt = new int[] { 
				200, 201, 300, 250, 400, 250, 100, 200, 50, 60, 100,
				175, 125, 150, 210, 350, 230, 310, 340, 220, 205, 100 };
		if( dailyInfodb.getCaloriesBurntForMonth(10, 2010 ).isEmpty()){

			for (int i = 1; i < caloriesConsumed.length; i++){
				dailyInfodb.insertDailyInfo("1","exercise",new Date(110, 9, i),0,caloriesBurnt[i]);
				dailyInfodb.insertDailyInfo("1","dinner",new Date(110, 9, i),caloriesConsumed[i],0);
				dailyInfodb.insertDailyInfo("1","snack",new Date(110, 9, i),100,0);
				}
			dailyInfodb.insertDailyInfo("1","breakfast",new Date(110, 9, 10),250,0);
			dailyInfodb.insertDailyInfo("1","lunch",new Date(110, 9, 10), 100,0);
			
			
		}

		dailyInfodb.close();

	}
}
